
<%@ page language="java" contentType="text/html; charset=US-ASCII"
	pageEncoding="US-ASCII"%>
<%@ page import="java.util.*"%>
<%@ page import="fr.esgi.donnees.Database"%>
<%@ page import="fr.esgi.classes.Projet"%>
<%
String uid=String.valueOf(session.getAttribute("uid"));
 	ArrayList<Projet> list;
 	Database c = new Database();
 	list = c.afficherProjetEtudiant(uid);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>liste des projets</title>
</head>
<BODY>
	<table border='2'>
		<tr>
			<!-- 			<TH>ID</th> -->
			<TH>Nom</th>
			<TH>regles</th>
			<TH>constitution groupe</th>
			<TH>nombre d'etudiants</th>
			<TH>Promotion</th>
			<TH>Groupe</th>
			<TH>voir les groupes</th>
			<TH>voir les soutenances</th>
		</tr>
		<%
			for (int i = 0; i < list.size(); i++) {
				String id = String.valueOf(list.get(i).getId());
				out.print("<tr>");
				out.print("<td>" + list.get(i).getNom() + "</td>");
				out.print("<td>" + list.get(i).getDescription() + "</td>");
				out.print("<td>" + list.get(i).getCompositionGroupes()
						+ "</td>");
				out.print("<td>" + list.get(i).getNbEtudiantRequis() + "</td>");
				out.print("<td>" + list.get(i).getPromotion() + "</td>");
				out.print("<td>" + list.get(i).getGroupe() + "</td>");
				out.print("<td><div align=\"center\"><a href=\"GroupeEtudiant?id_projet="
						+ list.get(i).getId() + "\">voir les groupes </td>");
				if(list.get(i).getCompositionGroupes().equals("libre")){
				out.print("<td><div align=\"center\"><a href=\"InscriptionProjet?id_projet="
						+ list.get(i).getId() + "\">s'inscrire au projet</td>");	
				}
				out.print("<td><div align=\"center\"><a href=\"AffichageSoutenance?id_projet="
						+ list.get(i).getId() + "\">voir les soutenance </td></tr>");
			}
		%>

	</table>
</body>
</html>